<?php 

$sql = " show index from {$meta_info['object']} ";

$_data = $this->getData($sql);


$_temp_data = new DBData($this);
$_temp_data->setFields(
		array(
			'TABLE_NAME',
			'INDEX_NAME',
			'COLUMN_POSITION',	
			'COLUMN_NAME',
			'DESCEND',
			'UQ',
			'PK',
			'INDEX_TYPE',
			'ISNULL',
			'COMMENT'
		)
);

while($_data->next()) { 
	$_temp_data->add(
		array(
			'TABLE_NAME'		=> $_data->table,
			'INDEX_NAME'		=> $_data->key_name,
			'COLUMN_POSITION'	=> $_data->seq_in_index,	
			'COLUMN_NAME'		=> $_data->column_name,
			'DESCEND'			=> ($_data->collation == 'A') ? 'ASC' : 'DESC',
			'UQ'				=> ($_data->non_unique == 1) ? '' : 'UQ',
			'PK'				=> ($_data->key_name == 'PRIMARY') ? 'PK' : '',
			'INDEX_TYPE'		=> $_data->index_type,
			'ISNULL'			=> ($_data->null == 'YES') ? 'Y' : 'N',
			'COMMENT'			=> $_data->comment
		)	
	);

}

$_data = null;

return $_temp_data;

?>